#pragma	once

#include "ZWin32Console.h"
#include "ZSingleton.h"
#include "ZGameMessageController.h"
#include "ZMessageFetcher.h"
#include "ZMessageBuilder.h"

class	ClientConsole
	:	public Z::Win32Console<ClientConsole>,
		public Z::Singleton<ClientConsole>
{
public:
	ClientConsole();
	virtual	~ClientConsole();
	virtual	bool	initialise();
	virtual	void	finalise();
private:
	virtual	bool	handle(char command);
	virtual	void	doProcess(float frameTime);

private:
	typedef	Z::GameMessageController<Z::MessageFetcher, Z::MessageBuilder>	MessageManager;
	bool	mTransfering;
	typedef	boost::shared_ptr<MessageManager>	MessageManagerPtr;
	typedef	std::vector<MessageManagerPtr>	MessageManagers;
	MessageManagers	mMessageManagers;
	static	const	size_t	mClientSocket	= 500;
};